import collections


def solve():
    n, m, k = map(int, input().split())
    a = input()

    # Precompute next_land_arr and next_swamp_arr
    # next_land_arr[i] stores the position of the first 'L' cell at or after position i.
    #   A position of n+1 means it's the target end, considered land.
    # next_swamp_arr[i] stores the position of the first 'C' cell at or after position i.
    #   A position of n+2 means no swamp until beyond n+1.

    # Arrays are 1-indexed for positions 1 to n. Size n+2 to include n+1 and n+2 for sentinels.
    next_land_arr = [n + 1] * (n + 2)
    next_swamp_arr = [n + 2] * (n + 2)

    # Populate arrays by iterating backwards from position n down to 1
    for i in range(n, 0, -1):
        if a[i - 1] == 'L':  # If current cell (position i) is Land
            next_land_arr[i] = i
            next_swamp_arr[i] = next_swamp_arr[i + 1]  # Swamp info propagates from right
        elif a[i - 1] == 'W':  # If current cell (position i) is Water
            next_land_arr[i] = next_land_arr[i + 1]  # Land info propagates from right
            next_swamp_arr[i] = next_swamp_arr[i + 1]  # Swamp info propagates from right
        elif a[i - 1] == 'C':  # If current cell (position i) is Swamp
            next_land_arr[i] = next_land_arr[i + 1]  # Land info propagates from right
            next_swamp_arr[i] = i  # This is the first swamp at or after i

    current_land_pos = 0  # Starting at position 0 (implicitly Land)
    remaining_k = k

    while current_land_pos <= n:  # Loop until we reach or pass the end (n+1)
        # 1. Check for immediate victory: Can we jump directly to or past n+1?
        if current_land_pos + m >= n + 1:
            print("YES")
            return

        # Initialize variables for the best next step
        found_next_step_in_current_iteration = False

        # 2. Option A: Try to jump directly to furthest land (0 water cost)
        furthest_direct_land_pos = -1
        # Iterate jump distances from m down to 1 to prioritize further jumps
        for jump_dist in range(m, 0, -1):
            target_pos = current_land_pos + jump_dist

            # If target_pos exceeds n, it means we are jumping past the map cells (1 to n).
            # This case is handled by the `current_land_pos + m >= n + 1` check.
            # So, we only care about target_pos within the map (1 to n).
            if target_pos > n:
                continue

            if a[target_pos - 1] == 'L':
                furthest_direct_land_pos = target_pos
                found_next_step_in_current_iteration = True
                break  # Found the furthest direct land jump, take it and break

        if furthest_direct_land_pos != -1:
            current_land_pos = furthest_direct_land_pos
            continue  # Move to the next iteration of the main loop

        # 3. Option B: No direct land jump. Must try jumping into water (if possible)
        #    Find the best jump-swim path: furthest reachable land, then minimum water cost.
        best_swim_to_land_pos = -1
        min_swim_cost_for_best = float('inf')

        # Iterate jump distances from m down to 1 to prioritize further jumps
        for jump_dist in range(m, 0, -1):
            target_pos = current_land_pos + jump_dist

            # Similar to above, if target_pos > n, it's covered by direct victory check.
            # We are interested in cells within map 'a' (1 to n).
            if target_pos > n:
                continue

            if a[target_pos - 1] == 'C':
                continue  # Cannot jump to a swamp

            if a[target_pos - 1] == 'W':
                # We jump to water at target_pos. Now we need to swim.
                swim_start_pos = target_pos
                swim_end_land_pos = next_land_arr[swim_start_pos]  # Find next land from here
                first_swamp_in_path = next_swamp_arr[swim_start_pos]  # Find first swamp from here

                # Check if a swamp blocks the swim path to the next land
                if first_swamp_in_path < swim_end_land_pos:
                    continue  # Swamp encountered before reaching next land, this path is invalid

                swim_cost = swim_end_land_pos - swim_start_pos

                if swim_cost <= remaining_k:
                    # This is a viable swim path to swim_end_land_pos
                    # Prioritize path that leads to furthest land
                    if swim_end_land_pos > best_swim_to_land_pos:
                        best_swim_to_land_pos = swim_end_land_pos
                        min_swim_cost_for_best = swim_cost
                    # If same land position, choose path with less water cost
                    elif swim_end_land_pos == best_swim_to_land_pos and swim_cost < min_swim_cost_for_best:
                        min_swim_cost_for_best = swim_cost

                    found_next_step_in_current_iteration = True  # Found at least one way to advance

        if best_swim_to_land_pos != -1:
            current_land_pos = best_swim_to_land_pos
            remaining_k -= min_swim_cost_for_best
            continue  # Move to the next iteration of the main loop

        # If we reach here, it means:
        # 1. Cannot jump directly to land.
        # 2. Cannot jump to water and successfully swim to the next land (or n+1).
        # This implies the character is stuck and cannot progress.
        print("NO")
        return

    # If the loop finishes, it means current_land_pos eventually reached or passed n+1.
    # This state means success.
    print("YES")


# Read the number of test cases
num_test_cases = int(input())
for _ in range(num_test_cases):
    solve()

